﻿<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>我的关注</title>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/css/common.css}" rel="stylesheet">
    <link th:href="@{/css/user.css}" rel="stylesheet">


</head>
<body>
<div class="container" style="background:white">
    <div th:replace="~{commons/common::header}"></div>
    <div th:replace="~{commons/common::topbar}"></div>
    <div class="row">
        <div class="col-md-9 col-sm-12">
            <div class="user-info-box">
                <div class="user-info-inner-box" style="height: 639px">
                    <h2>我的关注</h2>
                    <!--关注-->
                    <table class="table table-hover text-center">
                        <thead>
                        <tr>
                            <th class="text-center">序号</th>
                            <th class="text-center">关注人</th>
                            <th class="text-center">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="att,stat:${attentionList}">
                            <td th:text="${stat.count}"></td>

                            <td><a th:href="@{/user/toViewBlogger/{bloggerId}(bloggerId = ${att.bloggerId})}">
                                <img th:src="@{/{src}(src=(${att.image}==''?'imgs/default.jpg':'upload/'+${att.image}))}"
                                     class="img-circle" alt="Responsive image" style="width: 20px"/>
                                [[${att.bloggerName}]]</a></td>
                            <td>
                                <a th:href="@{/user/unAttention2(bloggerId = ${att.bloggerId})}"
                                   onclick="if (!confirm('确定要取关ta吗?┭┮﹏┭┮')) return false;">
                                    <img th:src="@{/imgs/break.jpg}" alt="Responsive image" style="width: 20px">
                                </a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                    <!--END关注-->
                    <!--分页-->
                    <div class="col-sm-12 text-center">
                        <nav aria-label="Page navigation">
                            <ul class="pagination">
                                <li>
                                    <a th:href="@{/user/attentionList(pageNo = (${pageNo}>1? ${pageNo}-1:${pageNo}))}"
                                       aria-label="Previous">
                                        <span aria-hidden="true">&laquo;</span>
                                    </a>
                                </li>
                                <li th:each="pageNum:${pageNumList}" th:class="${pageNum == pageNo? 'active':''}">
                                    <a th:href="@{/user/attentionList(pageNo = ${pageNum} )}" th:text="${pageNum}"></a>
                                </li>
                                <li>
                                    <a th:href="@{/user/attentionList(pageNo = (${pageNo}==${totalPage}? ${pageNo}:${pageNo}+1))}"
                                       aria-label="Next">
                                        <span aria-hidden="true">&raquo;</span>
                                    </a>
                                </li>
                            </ul>
                        </nav>
                    </div>
                    <!--END分页-->
                </div>
            </div>

        </div>
        <div class="col-md-3 col-sm-12">
            <div th:replace="~{commons/common::headerimage}"></div>
            <div th:replace="~{commons/common::hotrange}"></div>
        </div>
    </div>
    <div th:replace="~{commons/common::footer}"></div>

</div>
</body>
<script th:src="@{/js/jquery-1.11.0.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/button.js}"></script>
<script th:src="@{/js/common.js}"></script>
<script th:src="@{/js/user/attention.js}"></script>
</html>







